<template>
    <div>
        <el-button>{{ name }}</el-button>
    </div>

</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { userRequest } from '@/apis/api/common'
import { accountCoupons } from '@/apis/api/common'

/**
 * props
 */

const useinfo = ({
    name: {
        type: String,
        default: 'default'
    }
})


var name = ref<any>()
var arrray = ref<any>([])

/**
 * methods
 */

// 测试请求
const GetUser = () => {
    let data = {
        circle_id: 186,
        user_id: 100007
    }
    userRequest(data).then(res => {
        console.log(res.data.data.name)

        name.value = res.data.data.name
    }).catch(err => {
        console.log(err)
    })
}


const getAccountCoupons = () => {
    accountCoupons().then(res => {
        // console.log(res)
    }).catch(err => {
        console.log(err)
    })
}

/**
 * 页面挂在
 */

onMounted(() => {
    GetUser()
    getAccountCoupons()
})
</script>


<style scoped lang="scss">
.read-the-docs {
    color: #f00;
}
</style>
